home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-06-04 | 3.5 KB | 83 lines | [TEXT/nX^n] |
- Help file for QuickBASIC graphics examples.
-
- © 1991 Ralph Gonzalez, PO Box 54, Newark, DE 19711, USA.
-
-
-
- INTRODUCTION:
-
- These are Microsoft Macintosh QuickBASIC programs I developed for a
- class on microcomputer graphics. The programs cover graphics
- primitives, segmentation, animation techniques, user interface design,
- and 2D and 3D image transformation. An attempt (!) was made to use good
- code structure, including extensive use of subprograms and documentation
- of potentially-obscure instructions (unlike the examples provided by
- Microsoft!). I chose to explicitly declare all variables even though
- QuickBASIC doesn't require declaration of non-array variables. The
- limitations of Macintosh QuickBASIC (version 1.0 at the time of writing)
- may have led to an overreliance on shared (global) variables, however.
-
- An attempt was also made to avoid dependence on a particular machine
- configuration. All of these will work on any Macintosh, with the
- exception of the antialiasing example which requires a color or gray-
- scale monitor, and patterns.bas, which should be modified if color is
- not available.
-
-
- DISTRIBUTION/SUPPORT:
-
- All these programs are free for non-commercial use. Please help me
- distribute them further by giving copies (including this help file) to
- other interested persons. Please contact me if you have comments or
- suggestions.
-
-
- FILES:
-
- QB graphics help (this file)
- patterns.bas color pattern-drawing exercise
- antialias.bas demonstrates antialiasing using color/gray scale
- segmaker.bas creates simple graphics segment and saves
- it to a file.
- segview.bas load segments from file (using suitable format)
- and display them.
- dragger.bas demonstrates using the mouse to "drag" a graphic
- object, represented either as a list of
- instructions, a segment, or a bitmap.
- event shell.bas an application "skeleton", which may be used
- as the basis for writing programs using the
- standard Mac menu-window interface. Includes
- a complete File menu implementation.
- viewport.bas for mapping 2D images from "world" coordinate
- system "windows" to Mac "viewports". Con-
- fusingly, these viewports are usually termed
- "windows" themselves.
- cube3d.bas displays a 3D cube, with animation as the
- mouse is moved. Compile for better performance.
-
-
- NOTES:
-
- The sequence above is that which I used for introducing these concepts.
- The first few programs don't rely heavily on Macintosh-specific issues,
- and can be easily rewritten for other computers.
-
- Read the comments in the code for compilation instructions and for help
- adapting the code to suit your own purposes.
-
- I tried to stay within the "standard" machine-independent QuickBASIC
- syntax when possible. Otherwise, I tried to use only built-in Macintosh
- QuickBASIC statements; otherwise, I tried to use Macintosh ROM routines
- which are keywords in Macintosh QuickBASIC (Appendix D of the QuickBASIC
- 1.0 manual), otherwise I used existing QuickBASIC "Toolbox Library"
- routines (Appendix E of the QuickBASIC 1.0 manual). I never resorted to
- using the "Toolbox" statement (E.10.3 in the manual) to access the
- remaining Macintosh ROM routines directly, partly because I was
- attempting to maintain SOME illusion of machine-independence!
-
- Saving and opening these programs using the QuickBASIC built-in editor
- will be much faster is you choose "Save As" and save them in the
- "Compressed" format. On the other hand, the Edit editor which is
- distributed with QuickBASIC is often handy, and requires the file to be
- saved as text.
-